![New axobject-query Maintainer Faces Backlash Over Controversial Decision to Support Legacy Node.js Versions](https://cdn.sanity.io/images/cgdhsj6q/production/86e6ebdea652d20da070ebbda20134b839972db7-1024x1024.webp?w=800&fit=max&auto=format)
Security News
New axobject-query Maintainer Faces Backlash Over Controversial Decision to Support Legacy Node.js Versions
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.
@jiaminghi/color
Advanced tools
Changelog
0.0.2-alpha (2019-04-08)
Readme
Deepen color
Brighten color
Adjust color opacity
Convert color to hex color
Convert color to rgb/rgba color
Get color opacity
Get the color rgb value
Get the color rgba value
Get Color from rgb value
npm install @jiaminghi/color
/**
* @description Deepen color
* @param {String} color Hex or rgb/rgba color
* @return {Number} Percent of Deepen
* @return {String} Rgba color
*/
function darken (color, percent) {
//...
}
const before = '#3080E8'
const after = darken(color, 20)
// after = 'rgba(0,78,182,1)'
/**
* @description Brighten color
* @param {String} color Hex or rgb/rgba color
* @return {Number} Percent of brighten
* @return {String} Rgba color
*/
function lighten (color, percent) {
//...
}
const before = '#3080E8'
const after = lighten(color, 20)
// after = 'rgba(98,178,255,1)'
/**
* @description Adjust color opacity
* @param {String} color Hex or rgb/rgba color
* @return {Number} Percent of opacity
* @return {String} Rgba color
*/
function fade (color, percent) {
//...
}
const before = '#3080E8'
const after = lighten(color, 20)
// after = 'rgba(48,128,232,0.2)'
/**
* @description Convert color to hex color
* @param {String} color Hex or rgb/rgba color
* @return {String} Hex color
*/
function toHex (color) {
//...
}
const before = 'rgb(48,128,232)'
const after = toHex(before)
// after = '#3080e8'
/**
* @description Convert color to rgb/rgba color
* @param {String} color Hex or rgb/rgba color
* @param {Number} opacity The opacity of color
* @return {String} Rgb/rgba color
*/
function toRgb (color, opacity) {
//...
}
const before = '#3080E8'
const after1 = toRgb(before)
// after1 = 'rgb(48,128,232)'
const after2 = toRgb(before, 0.2)
// after2 = 'rgba(48,128,232,0.2)'
/**
* @description Get the opacity of the color
* @param {String} color Hex or rgb/rgba color
* @return {Number} Color opacity
*/
function getOpacity (color) {
//...
}
const color1 = '#3080E8'
const color2 = 'rgba(48,128,232,0.2)'
const opacity1 = getOpacity(color1)
// opacity1 = 1
const opacity2 = getOpacity(color2)
// opacity2 = 0.2
/**
* @description Get the color rgb value
* @param {String} color Hex or rgb/rgba color
* @return {Array} Rgb value of the color
*/
function getRgbValue (color) {
//...
}
const color = '#3080E8'
const rgbValue = getRgbValue(color)
// rgbValue = [48, 128, 232]
/**
* @description Get the color rgba value
* @param {String} color Hex or rgb/rgba color
* @return {Array} Rgba value of the color
*/
function getRgbaValue (color) {
//...
}
const color1 = '#3080E8'
const color2 = 'rgba(48,128,232,0.2)'
const rgbaValue1 = getRgbaValue(color1)
// rgbaValue1 = [48, 128, 232, 1]
const rgbaValue2 = getRgbaValue(color2)
// rgbaValue2 = [48, 128, 232, 0.2]
/**
* @description Get Color from rgb value
* @param {Array} value Rgb color value
* @return {String} Rgb / rgba color
*/
function getColorFromRgbValue (value) {
//...
}
const value1 = [48, 128, 232]
const value2 = [48, 128, 232, 0.2]
const color1 = getColorFromRgbValue(value1)
// color1 = 'rgb(48,128,232)'
const color2 = getColorFromRgbValue(value2)
// color2 = 'rgba(48,128,232,0.2)'
FAQs
Color extension
The npm package @jiaminghi/color receives a total of 3,121 weekly downloads. As such, @jiaminghi/color popularity was classified as popular.
We found that @jiaminghi/color demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.
Security News
Results from the 2023 State of JavaScript Survey highlight key trends, including Vite's dominance, rising TypeScript adoption, and the enduring popularity of React. Discover more insights on developer preferences and technology usage.
Security News
The US Justice Department has penalized two consulting firms $11.3 million for failing to meet cybersecurity requirements on federally funded projects, emphasizing strict enforcement to protect sensitive government data.